Optimal. Leaf size=149 \[ -\frac {d \cos \left (c-\frac {a d}{b}\right ) \text {Ci}\left (\frac {a d}{b}+d x\right )}{a b}+\frac {\text {Ci}(d x) \sin (c)}{a^2}-\frac {\text {Ci}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{a^2}+\frac {\sin (c+d x)}{a (a+b x)}+\frac {\cos (c) \text {Si}(d x)}{a^2}-\frac {\cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a^2}+\frac {d \sin \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {6874, 3384,
3380, 3383, 3378} \begin {gather*} -\frac {\sin \left (c-\frac {a d}{b}\right ) \text {CosIntegral}\left (\frac {a d}{b}+d x\right )}{a^2}-\frac {\cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (x d+\frac {a d}{b}\right )}{a^2}+\frac {\sin (c) \text {CosIntegral}(d x)}{a^2}+\frac {\cos (c) \text {Si}(d x)}{a^2}-\frac {d \cos \left (c-\frac {a d}{b}\right ) \text {CosIntegral}\left (\frac {a d}{b}+d x\right )}{a b}+\frac {d \sin \left (c-\frac {a d}{b}\right ) \text {Si}\left (x d+\frac {a d}{b}\right )}{a b}+\frac {\sin (c+d x)}{a (a+b x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 6874
Rubi steps
\begin {align*} \int \frac {\sin (c+d x)}{x (a+b x)^2} \, dx &=\int \left (\frac {\sin (c+d x)}{a^2 x}-\frac {b \sin (c+d x)}{a (a+b x)^2}-\frac {b \sin (c+d x)}{a^2 (a+b x)}\right ) \, dx\\ &=\frac {\int \frac {\sin (c+d x)}{x} \, dx}{a^2}-\frac {b \int \frac {\sin (c+d x)}{a+b x} \, dx}{a^2}-\frac {b \int \frac {\sin (c+d x)}{(a+b x)^2} \, dx}{a}\\ &=\frac {\sin (c+d x)}{a (a+b x)}-\frac {d \int \frac {\cos (c+d x)}{a+b x} \, dx}{a}+\frac {\cos (c) \int \frac {\sin (d x)}{x} \, dx}{a^2}-\frac {\left (b \cos \left (c-\frac {a d}{b}\right )\right ) \int \frac {\sin \left (\frac {a d}{b}+d x\right )}{a+b x} \, dx}{a^2}+\frac {\sin (c) \int \frac {\cos (d x)}{x} \, dx}{a^2}-\frac {\left (b \sin \left (c-\frac {a d}{b}\right )\right ) \int \frac {\cos \left (\frac {a d}{b}+d x\right )}{a+b x} \, dx}{a^2}\\ &=\frac {\text {Ci}(d x) \sin (c)}{a^2}-\frac {\text {Ci}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{a^2}+\frac {\sin (c+d x)}{a (a+b x)}+\frac {\cos (c) \text {Si}(d x)}{a^2}-\frac {\cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a^2}-\frac {\left (d \cos \left (c-\frac {a d}{b}\right )\right ) \int \frac {\cos \left (\frac {a d}{b}+d x\right )}{a+b x} \, dx}{a}+\frac {\left (d \sin \left (c-\frac {a d}{b}\right )\right ) \int \frac {\sin \left (\frac {a d}{b}+d x\right )}{a+b x} \, dx}{a}\\ &=-\frac {d \cos \left (c-\frac {a d}{b}\right ) \text {Ci}\left (\frac {a d}{b}+d x\right )}{a b}+\frac {\text {Ci}(d x) \sin (c)}{a^2}-\frac {\text {Ci}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{a^2}+\frac {\sin (c+d x)}{a (a+b x)}+\frac {\cos (c) \text {Si}(d x)}{a^2}-\frac {\cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a^2}+\frac {d \sin \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.70, size = 138, normalized size = 0.93 \begin {gather*} \frac {\frac {a \cos (d x) \sin (c)}{a+b x}+\text {Ci}(d x) \sin (c)-\frac {\text {Ci}\left (d \left (\frac {a}{b}+x\right )\right ) \left (a d \cos \left (c-\frac {a d}{b}\right )+b \sin \left (c-\frac {a d}{b}\right )\right )}{b}+\frac {a \cos (c) \sin (d x)}{a+b x}+\cos (c) \text {Si}(d x)-\cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (d \left (\frac {a}{b}+x\right )\right )+\frac {a d \sin \left (c-\frac {a d}{b}\right ) \text {Si}\left (d \left (\frac {a}{b}+x\right )\right )}{b}}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 210, normalized size = 1.41
method | result | size |
derivativedivides | \(-\frac {d b \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\sinIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\cosineIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )}{a}+\frac {\sinIntegral \left (d x \right ) \cos \left (c \right )+\cosineIntegral \left (d x \right ) \sin \left (c \right )}{a^{2}}-\frac {b \left (\frac {\sinIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\cosineIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{a^{2}}\) | \(210\) |
default | \(-\frac {d b \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\sinIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\cosineIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )}{a}+\frac {\sinIntegral \left (d x \right ) \cos \left (c \right )+\cosineIntegral \left (d x \right ) \sin \left (c \right )}{a^{2}}-\frac {b \left (\frac {\sinIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\cosineIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{a^{2}}\) | \(210\) |
risch | \(\frac {d \,{\mathrm e}^{-\frac {i \left (d a -c b \right )}{b}} \expIntegral \left (1, -i d x -i c -\frac {i a d -i b c}{b}\right )}{2 a b}-\frac {i {\mathrm e}^{-\frac {i \left (d a -c b \right )}{b}} \expIntegral \left (1, -i d x -i c -\frac {i a d -i b c}{b}\right )}{2 a^{2}}+\frac {i {\mathrm e}^{i c} \expIntegral \left (1, -i d x \right )}{2 a^{2}}+\frac {{\mathrm e}^{\frac {i \left (d a -c b \right )}{b}} \expIntegral \left (1, i d x +i c +\frac {i \left (d a -c b \right )}{b}\right ) d}{2 a b}+\frac {i {\mathrm e}^{\frac {i \left (d a -c b \right )}{b}} \expIntegral \left (1, i d x +i c +\frac {i \left (d a -c b \right )}{b}\right )}{2 a^{2}}-\frac {{\mathrm e}^{-i c} \pi \,\mathrm {csgn}\left (d x \right )}{2 a^{2}}+\frac {{\mathrm e}^{-i c} \sinIntegral \left (d x \right )}{a^{2}}-\frac {i {\mathrm e}^{-i c} \expIntegral \left (1, -i d x \right )}{2 a^{2}}-\frac {\sin \left (d x +c \right ) d x b}{a \left (b x +a \right ) \left (-d x b -d a \right )}-\frac {\sin \left (d x +c \right ) d}{\left (b x +a \right ) \left (-d x b -d a \right )}\) | \(325\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 260, normalized size = 1.74 \begin {gather*} \frac {2 \, a b \sin \left (d x + c\right ) + 2 \, {\left (b^{2} x + a b\right )} \cos \left (c\right ) \operatorname {Si}\left (d x\right ) - {\left ({\left (a b d x + a^{2} d\right )} \operatorname {Ci}\left (\frac {b d x + a d}{b}\right ) + {\left (a b d x + a^{2} d\right )} \operatorname {Ci}\left (-\frac {b d x + a d}{b}\right ) + 2 \, {\left (b^{2} x + a b\right )} \operatorname {Si}\left (\frac {b d x + a d}{b}\right )\right )} \cos \left (-\frac {b c - a d}{b}\right ) + {\left ({\left (b^{2} x + a b\right )} \operatorname {Ci}\left (d x\right ) + {\left (b^{2} x + a b\right )} \operatorname {Ci}\left (-d x\right )\right )} \sin \left (c\right ) + {\left ({\left (b^{2} x + a b\right )} \operatorname {Ci}\left (\frac {b d x + a d}{b}\right ) + {\left (b^{2} x + a b\right )} \operatorname {Ci}\left (-\frac {b d x + a d}{b}\right ) - 2 \, {\left (a b d x + a^{2} d\right )} \operatorname {Si}\left (\frac {b d x + a d}{b}\right )\right )} \sin \left (-\frac {b c - a d}{b}\right )}{2 \, {\left (a^{2} b^{2} x + a^{3} b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sin {\left (c + d x \right )}}{x \left (a + b x\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1281 vs.
\(2 (153) = 306\).
time = 4.15, size = 1281, normalized size = 8.60 \begin {gather*} -\frac {{\left ({\left (b x + a\right )} a {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} d^{2} \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) - a b c d^{2} \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) + a^{2} d^{3} \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) + {\left (b x + a\right )} a {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} d^{2} \sin \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) - a b c d^{2} \sin \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) + a^{2} d^{3} \sin \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) - {\left (b x + a\right )} b {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} d \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b} - c\right ) \sin \left (c\right ) + b^{2} c d \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b} - c\right ) \sin \left (c\right ) - a b d^{2} \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b} - c\right ) \sin \left (c\right ) - {\left (b x + a\right )} b {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} d \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) \sin \left (-\frac {b c - a d}{b}\right ) + b^{2} c d \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) \sin \left (-\frac {b c - a d}{b}\right ) - a b d^{2} \operatorname {Ci}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) \sin \left (-\frac {b c - a d}{b}\right ) + {\left (b x + a\right )} b {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} d \cos \left (c\right ) \operatorname {Si}\left (-\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b} + c\right ) - b^{2} c d \cos \left (c\right ) \operatorname {Si}\left (-\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b} + c\right ) + a b d^{2} \cos \left (c\right ) \operatorname {Si}\left (-\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b} + c\right ) + {\left (b x + a\right )} b {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} d \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) - b^{2} c d \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) + a b d^{2} \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - b c + a d}{b}\right ) + a b d^{2} \sin \left (-\frac {{\left (b x + a\right )} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )}}{b}\right )\right )} b^{3}}{{\left ({\left (b x + a\right )} a^{2} b^{4} {\left (\frac {b c}{b x + a} - \frac {a d}{b x + a} + d\right )} - a^{2} b^{5} c + a^{3} b^{4} d\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sin \left (c+d\,x\right )}{x\,{\left (a+b\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________